//
//  AticleSpacialTableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "AticleSpacialTableViewCell.h"

#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)
@implementation AticleSpacialTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bgImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.bgImage];
        
        self.smallImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.smallImage];
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.textColor = [UIColor whiteColor];
        [self.bgImage addSubview:self.titleLabel];
        
        self.descLabel = [[UILabel alloc]init];
        self.descLabel.textColor = [UIColor whiteColor];
        [self.bgImage addSubview:self.descLabel];
        
        self.loveNum = [[UILabel alloc]init];
        self.loveNum.textColor = [UIColor yellowColor];
        [self.bgImage addSubview:self.loveNum];
        
        self.signLabel = [[UILabel alloc]init];
        self.signLabel.text = @"/";
        [self.bgImage addSubview:self.signLabel];
        
        self.sub_numLabel = [[UILabel alloc]init];
        self.sub_numLabel.textColor = [UIColor yellowColor];
        [self.bgImage addSubview:self.sub_numLabel];
 
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.bgImage.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
    self.smallImage.frame = CGRectMake(self.contentView.bounds.size.width/2-40 * WIDTH, 40 * HEIGH, 80 * WIDTH, 80 * HEIGH);
    self.titleLabel.frame = CGRectMake(60 * WIDTH, 130 * HEIGH,  280 * WIDTH, 30 * HEIGH);
    self.descLabel.frame = CGRectMake(20 * WIDTH, 170 * HEIGH, self.contentView.bounds.size.width - 40 * WIDTH, 100 * HEIGH);
    self.loveNum.frame = CGRectMake(100 * WIDTH, 300 * HEIGH, 80 * WIDTH, 20 * HEIGH);
    self.signLabel.frame = CGRectMake(190 * WIDTH, 300 * HEIGH, 10 * WIDTH , 20 * HEIGH);
    self.sub_numLabel.frame = CGRectMake(200 * WIDTH, 300 * HEIGH, 100 * WIDTH, 20 * HEIGH);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
